<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>BackGrid Complete example (Recommended!)</title>

<link rel="stylesheet" href="../../lib/bootstrap/3.3.5/css/bootstrap.min.css"/>
<link rel="stylesheet" href="../../lib/backgrid/0.3.5/backgrid.min.css">
<link rel="stylesheet" href="../../lib/backgrid/0.3.5/backgrid-select-all.css">
<link rel="stylesheet" href="../../lib/backgrid/0.3.5/backgrid-paginator.css">
<link rel="stylesheet" href="../../lib/backgrid/0.3.5/backgrid-filter.css">
<!--
<link rel="stylesheet" href="../../css/styles.css" />
<link rel="stylesheet" href="../../css/layout.css" />
-->

</head>
<body>
	<div class="container-fluid">
		<div class="row">
			<div class="col-sm-12">
				<h3 class="page-header text-center">
				数据对象存储库管理<br />  <small>(FDB Viewer & Management)</small>
				</h3>
			</div>
		</div>
		<div class="row">
			<div class="col-sm-12">
				<div id="winetile">
					Object Tile Area for Listing and Addnew/Editing
				</div> 
			</div> 
		</div>	
	</div> <!-- container -->

    <script type="text/template" id="tpl_winetile">
    <div id="winetile">
        <div id="objecteditor">object editor
            here. If you see this, it means the object list view or object item
            view are not displayed successfully!
		</div>
    </div>
    </script>

    <script type="text/template" id="tpl_itemlist"> 
	<div id="itemlist">
		<div class="row">
			<div class="col-sm-12">
				<!--
				<div class="col-sm-2">
					<button class="btn btn-default ">删除选中记录</button>
				</div>
				-->
				<span class="col-sm-4">
				<a href="#wines/httpupload" id="httpupload" class="btn btn-success">基于web上传</a>
				<a href="#ftp/import" id="ftpimport" class="btn btn-success">基于ftp导入</a>
				<!-- 
				<a href="#wines/deleteselected" id="deleteselected" class="btn btn-danger">Delete Selected</a>
				-->
				<a href="#wines/new" id="addnew" class="btn btn-success">Add</a>
				<a href="#" id="deleteselected" class="btn btn-danger">Delete Selected</a>
				</span>

				<form id="search" class="form-group">
					<!--
					<div class="col-sm-offset-3 col-sm-3">
						<input id="searchQuery" name="query" type="text" style="float:right" class="form-control" required />
					</div>
					<div class="col-sm-1">
						<button id='search' class="btn btn-outline btn-block btn-success save"><strong>搜索</strong></button>
					</div>
					<div class="col-sm-1 text-left vertical-middle-sm">
					-->
					<div class="col-sm-offset-7 col-sm-1 text-left vertical-middle-sm">
						<h5><strong>
							<a role="button" data-toggle="collapse" href="#advancedsearch" aria-expanded="false" aria-controls="advancedsearch">高级...</a>
						</strong></h5>
					</div>
				</form>
			</div>
		</div>

		<div class="row">
			<!--
			<div class="row">
				<div class="col-sm-12">
					<br/>
				</div>
			</div>
			-->
			
			<div class="collapse col-sm-12" id="advancedsearch">
				<div class="well">
					<div>
						<form class="form-horizontal contract-form">
						
							<div class="form-group">
								<label class="col-sm-1 control-label">Begin Time</label>
								<div class="col-sm-4">
									<input id="begintime" name="begintime" type="text" class="form-control" required />
								</div>
								<label class="col-sm-3 control-label">End Time</label>
								<div class="col-sm-4">
									<input id="endtime" name="endtime" type="text" class="form-control" required />
								</div>
							</div>
							
							<div class="form-group">
								<label class="col-sm-1 control-label">Logger Id</label>
								<div class="col-sm-4">
									<input id="deviceid" name="deviceid" type="text" class="form-control" required />
								</div>
							</div>
							
							<div class="form-group">
								<div class="col-sm-offset-9 col-sm-1">
									<button class="btn btn-outline btn-block btn-warning">清除</button>
								</div>
								<div class="col-sm-2">
									<button id='submitbutton' class="btn btn-outline btn-block btn-success save">提交</button>
								</div>
							</div>

						</form>
					</div>
				</div> 
			</div> 
		</div>

        <div id="backgrid" class="backgrid-container">If you see this, it means the backgrid is not displayed properly</div>
    </div>
    </script>
    
    <script type="text/template" id="tpl_itemdetail">
	<div class="col-sm-12">
		<div class="row">
			<div class="col-sm-12 text-left" style="background:LightGoldenRodYellow"><p><strong>数据对象结点编辑</strong><p></div>
		</div>
		
		<div class="row"><div class="col-sm-12"><br /></div></div>
		
		<div class="row">
			<form role="form" class="form-horizontal contract-form">
				<div class="form-group">
					<label class="col-sm-4 control-label">Id:</label>
					<div class="col-sm-6">
						<input id="id" name="id" type="text" value="<%= id %>"
							class="form-control contact-name-input" disabled />
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-4 control-label">Originname:</label>
					<div class="col-sm-6">
						<input type="text" id="originname" name="originname" value="<%= originname %>"
							class="form-control contact-name-input" disabled/>
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-4 control-label">Storageid:</label>
					<div class="col-sm-6">
						<input type="text" id="storageid" name="storageid"
							class="form-control contact-name-input" value="<%= storageid %>" />
					</div>
				</div>

				<div class="form-group">
					<label class="col-sm-4 control-label">Size:</label>
					<div class="col-sm-6">
						<input type="text" id="size" name="size"
							class="form-control contact-name-input" value="<%= size %>"  disabled/>
					</div>
				</div>
			
				<div class="form-group">
					<label class="col-sm-4 control-label">Properties:</label>
					<div class="col-sm-6">
						<textarea id="properties" name="properties"
							class="form-control contact-name-input"><%= properties %></textarea>
					</div>
				</div>
				<div class="form-group">
					<div class="col-sm-offset-4 col-sm-3">
						<button type="submit" class="btn btn-outline btn-lg btn-block save">Submit</button>
					</div>
					<div class="col-sm-3">
						<button class="btn btn-outline btn-lg btn-block cancel">Cancel</button>
					</div>
				</div
			</form>
		</div>
	</div>
    </script>

    <script type="text/template" id="tpl_ftpitemlist">
    <div class="col-sm-12" id="ftpitems">
		<div class="row">
			<div class="col-sm-12 text-left" style="background:LightGoldenRodYellow"><p><strong>从FTP文件夹导入并创建新结点</strong><p></div>
		</div>
		<div class="row"><div class="col-sm-12"><br /></div></div>

		<div class="row">
			<div class="col-sm-12" style="text-align:right">
			   <a class="btn btn-danger col-sm-offset-9 col-sm-1 cancel">取消</a> 
			   <a class="btn btn-success col-sm-2 import">提交</a> 
			</div>
		</div>
		<div class="row"><div class="col-sm-12"><br /></div></div>

		<div class="row" id="propertiesedit">
			<div class="col-sm-3"><label>数据文件对象属性</label></div>
			<div class="col-sm-9"><textarea id="fileproperties" name="fileproperties" class="form-control contact-name-input"></textarea></div>
			</div>
		</div>
		<div class="row"><div class="col-sm-12"><br /></div></div>

		<div class="row" id="propertiestempalte">
			<div class="col-sm-3"><label>数据文件对象属性范例模板</label></div>
			<div class="col-sm-9"><textarea id="propertiestemplate" name="propertiestempalte" class="form-control contact-name-input" disabled>{"loggerid":"1"}</textarea></div>
		</div>
		<div class="row"><div class="col-sm-12"><br /></div></div>

		<div class="row">
			<div class="col-sm-3"><label>请选择待导入的文件</label></div>
			<div class="col-sm-9">
				<div id="ftpbackgrid" class="backgrid-container">If you see this, it means the tpl_ftpitemlist is not displayed properly</div>
			</div>
		</div>
    </div>
    </script>

	<script type="text/template" id="tpl_httpupload">
	<div class="col-sm-12" id="httpuploadfile">
		<div class="row">
			<div class="col-sm-12" style="background:LightGoldenRodYellow"><p><strong>基于Web上传数据文件并创建新结点</strong><p></div>
		</div>
		<div class="row"><div class="col-sm-12"><br /></div></div>

		<div class="row">
			<div class="col-sm-12">
				<a class="btn btn-danger col-sm-offset-9 col-sm-1 cancel">取消</a> 
				<a class="btn btn-success col-sm-2 create">提交</a> 
			</div>
		</div>
		<div id="uploadproperties" class="row">
			<div class="col-sm-12">
            <label>数据文件对象属性</label>
            <textarea id="uploadfileproperties" name="uploadfileproperties" class="form-control contact-name-input">{"loggerid":"{Please_update_the_device_id_here}"}</textarea>
			</div>
		</div>

		<div class="row"><div class="col-sm-12"><br /></div></div>
		<div id="uploadpropertiestempalte" class="row">
			<div class="col-sm-12">
            <label>数据文件对象属性范例(仅供参考)</label>
            <textarea id="uploadfilepropertiestempalte" name="uploadfilepropertiestempalte" class="form-control contact-name-input" readonly>{"loggerid":"1"}
            </textarea>
			</div>
		</div>

		<div class="row"><div class="col-sm-12"><br /></div></div>
		<div id="jqueryupload" class="row">
			<div class="col-sm-12">
			<div class="row">
				<div class="col-sm-6">
				<!-- 
				<span class="btn btn-success fileinput-button">
				<i class="glyphicon glyphicon-plus">fdsaf</i>
				</span>
				-->
				<form  id="fileupload" enctype="multipart/form-data">
					<input id='inputfile' type="file" name="file" multiple>
				</form>
				<!--<input id="fileupload" type="file" name="files[]" multiple> -->
				</div>
			</div>
			<div class="row">
				<div class="col-sm-12">
					<div id="progress" class="progress">
						<div class="progress-bar progress-bar-success">Progress</div>
						<div id="files" class="files"></div>
					</div>
				</div>
			</div>
			</div>
		</div>
    </div>
    </script>

	<!--
	<script src="../../lib/jquery-1.11.0.js"></script>
	-->
    <script src="../../lib/jquery/2.1.4/jquery-2.1.4.min.js"></script>
    <script src="../../lib/bootstrap/3.3.5/js/bootstrap.min.js"></script>
	<!--
	<script src="../../lib/jquery-1.11.0.js"></script>
    <script src="../../lib/bootstrap/bootstrap.min.js"></script>
	-->
	<script src="../../lib/underscore/1.8.3/underscore-min-1.8.3.js"></script>
	<script src="../../lib/backbone/1.2.2/backbone.js"></script>
	<!--
	<script src="../../lib/backgrid/backbone-pageable.js"></script>
	-->
	<script src="../../lib/backbone.paginator/1.2.2/backbone.paginator.min.js"></script>
	<script src="../../lib/backgrid/0.3.5/backgrid.min.js"></script>
	<script src="../../lib/backgrid/0.3.5/backgrid-select-all.js"></script>
	<script src="../../lib/backgrid/0.3.5/backgrid-paginator.js"></script>
	<script src="../../lib/backgrid/0.3.5/backgrid-filter.js"></script>

    <script src="../../lib/jqueryupload-9.9.3/js/vendor/jquery.ui.widget.js"></script>
    <script src="../../lib/jqueryupload-9.9.3/js/jquery.iframe-transport.js"></script>
    <script src="../../lib/jqueryupload-9.9.3/js/jquery.fileupload.js"></script>

	<!--
    <script src="../../lib/bootstrap/bootstrap.min.js"></script>
    <script src="../../lib/backbone/underscore.js"></script>
    <script src="../../lib/backbone/backbone.js"></script>
    <script src="../../lib/backgrid/backbone-pageable.js"></script>
    <script src="../../lib/backgrid/backgrid.js"></script>
    <script src="../../lib/backgrid/backgrid-select-all.js"></script>
    <script src="../../lib/backgrid/backgrid-paginator.js"></script>
    <script src="../../lib/backgrid/backgrid-filter.js"></script>
	-->
	
    <script src="json2.js"></script>
    <script src="fdbviewer-test6.js"></script>

</body>
</html>
